package com.time.sky.controller;

import com.time.sky.entity.Floor;
import com.time.sky.service.FloorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
public class FloorController {
    @Autowired
    private FloorService floorService;
    @RequestMapping("/queryFloor")
    public List<Floor> queryFloor(Floor floor) {
        return floorService.queryFloor(floor);
    }
    @RequestMapping("addFloor")
    public void addFloor(Floor floor){
        floorService.addFloor(floor);
    }

    @RequestMapping("/getCount")
    public int getCount(Floor floor){
        return floorService.getCount(floor);
    }
}
